﻿/**
 * 表格的刷新功能。
 */
Ext.define('Happy.table.action.Refresh', {
    extend: 'Happy.Action',
    alias: 'action.refresh',

    /**
     * @inheritdoc
     */
    defaultConfig: {
        itemId: 'refresh',
        iconCls: 'refresh-button',
        text: '刷新',
        disabled: false,
        tableSelector: 'tablepanel'
    },

    /**
     * @inheritdoc
     */
    onClickHandler: function (button) {
        var me = this;

        me.up(button, me.initialConfig.tableSelector).refresh();
    }
});